package com.example.personal.api

import com.example.personal.mvvm.bean.*
import com.gsafety.libraryktx.base.RespBaseBean
import com.gsafety.libraryktx.bean.WarnData
import retrofit2.Call
import retrofit2.http.*
import java.util.*


/**
 * @author : lj
 * @date : 2020/9/18 11:20
 */
interface ApiService {
    @POST("rsubEwldMnWarnevents/currWarningStatis")
    fun currWarningStatis(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<List<CurrWarningBean>>>

    @POST("rsubEwldMnWarnevents/halfWarningStatis")
    fun halfWarningStatis(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<HalfWarningBean>>

    @POST("rsubEwldMnWarnevents/specialWarningDurationStatis")
    fun specialWarningStatis(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<List<SpecialWarningBean>>>


    @POST("rsubEwldMnWarnevents/halfWarningStatisTrend")
    fun halfWarningTrend(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<List<HalfTrendBean>>>

    @POST("rsubEwldMnWarnevents/specialWarningStatisTrend")
    fun specialTrend(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<List<SpecialTrendBean>>>

    @POST("rsubEwldMnWarnevents/specialWarningTrendStatis")
    fun specialStatis(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<List<SpecialStatisBean>>>

    @FormUrlEncoded
    @POST("bacoMnMyattation/selectByUserId")
    fun myWarnList(@FieldMap params: TreeMap<String, Any>): Call<RespBaseBean<AttentionBean>>

    @POST("bacoMnMyattation/insertMyAttation")
    fun setAttention(@Body params: TreeMap<String, Any>): Call<RespBaseBean<Boolean>>

    @POST("bacoMnMyattation/cancelMyAttation")
    fun cancelAttention(@Body params: TreeMap<String, Any>): Call<RespBaseBean<Boolean>>

    @POST("updatePassword")
    fun updatePassword(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<Any>>

    @POST("updateUserInfo")
    fun updateUserInfo(@QueryMap params: TreeMap<String, Any>): Call<RespBaseBean<Any>>
}